﻿using UnityEngine;
using System.Collections;
public class FGameControl{
	private static IGameControl gameContorl;
	public static void Clear(){
		gameContorl = null;
	}
	public static IGameControl getGameContorl(){
		if (gameContorl != null)
			return gameContorl;
		else
			return null;
	}
	static public IGameControl Create(System.Type type){
		GameObject contorlobj = new GameObject ("Contorl");
		gameContorl = contorlobj.AddComponent (type) as IGameControl;
		gameContorl.Init ();
		return gameContorl;
	}
}
public interface IGameControl {

	/// <summary>
	/// 初始化只允许初始化自身内部数据
	/// </summary>
	void Init();
	/// <summary>
	/// 初始化完毕的时候调用这个开始执行
	/// </summary>
	void onStart();
	void OnPreLoadBegin();
	void OnPreLoadFinish();
	/// <summary>
	/// 获取这个模型
	/// </summary>
	/// <returns>The object.</returns>
	GameObject getObj ();
}
